﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<link href="../../Content/AdminCSS/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui.min.js" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $("#batdausaungay").datepicker();
        $("#ketthuctruocngay").datepicker();
    });
</script>

<div id="bc">
	<div class="ja-breadcrums">
		<strong>You are here:</strong> <span class="breadcrumbs pathway">Tìm kiếm phiên</span>
	</div>
</div>
<div id="ja-mainbody" style="width:80%">
    <div id="ja-main" style="width:100%">
        <div id="ja-contentwrap" class="">
            <div id="ja-content" class="column" style="width:100%">
                <div id="ja-current-content" class="column" style="width:100%">
                    <div id="content"></div>
                    <div class="ja-content-main clearfix">
                        <div class="auction_header">Search</div>
                    <% using (Html.BeginForm("TimKiem", "Home", FormMethod.Post))
                       { %>
                        <table class="auction_search" width="100%">
                            <tbody>
                                <tr class="auction_search_title">
                                    <td>
                                        Tìm Phiên
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table>
                                            <tbody>
                                                <tr>
                                                    <td width="70px">Tìm Tiêu đề</td>
                                                    <td>
                                                        <%= Html.TextBox("tieude", "", new { @style = "width: 174px;" })%>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding: 5px;" colspan="2">
                                                        <%= Html.CheckBox("timtrongmotachitiet") %> &nbsp;Tìm trong mô tả chi tiết
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                   </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table>
                                            <tbody>
                                                <tr>
                                                    <td width="70px">Thư mục</td>
                                                    <td>
                                                        <%
                        List<SelectListItem> items = new List<SelectListItem>();
                        var lstDanhMucChinh = Model.DanhMucChinhModel.GetModel.LstObjModel;

                        items.Add(new SelectListItem
                        {
                            Text = "All",
                            Value = string.Empty
                        });

                        foreach (var danhmuc in lstDanhMucChinh)
                        {
                            items.Add(new SelectListItem
                            {
                                Text = danhmuc.TenDanhMucChinh,
                                Value = "0-" + danhmuc.ID.ToString()
                            });

                            var lstDanhMucCon = danhmuc.DanhMucCon;

                            foreach (var danhmuccon in lstDanhMucCon)
                            {
                                items.Add(new SelectListItem
                                {
                                    Text = "---- " + danhmuccon.TenDanhMucCon,
                                    Value = "1-" + danhmuccon.ID.ToString()
                                });
                            }

                        } 

                                                        %>
                                                        <%= Html.DropDownList("thumuc", new SelectList(items, "Value", "Text"))%>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr class="auction_search_title">
                                    <td>
                                        Tìm người bán
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table>
                                            <tbody>
                                                <tr valign="top">
                                                    <td width="70px">Người Bán</td>
                                                    <td>
                                                        <%
                        items = new List<SelectListItem>();
                        var lstNguoiDung = Model.NguoiDungModel.GetModel.LstObjModel;

                        items.Add(new SelectListItem
                        {
                            Text = "All",
                            Value = "-1"
                        });

                        foreach (var nguoidung in lstNguoiDung)
                        {
                            items.Add(new SelectListItem
                            {
                                Text = nguoidung.BaseInfo.UserName,
                                Value = nguoidung.BaseInfo.ID.ToString()
                            });
                        } 

                                                        %>
                                                        <%= Html.DropDownList("nguoiban", new SelectList(items, "Value", "Text"))%>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr class="auction_search_title">
                                    <td>
                                        Lọc theo ngày
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table>
                                            <tbody>
                                                <tr>
                                                    <td>Bắt đầu sau ngày</td>
                                                    <td>
                                                        <%= Html.TextBox("batdausaungay", "", new { @style = "width: 100px;" })%>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>Kết thúc trước ngày</td>
                                                    <td>
                                                        <%= Html.TextBox("ketthuctruocngay", "", new { @style = "width: 100px;" })%>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                   <td>
                                        <input type="submit" name="sbt" id="sbt" value="Tìm kiếm" style="background-image: url(../../Content/Images/Home/bgbutton.jpg); color: #FFFFFF; font-size: 16px; font-weight: bold; border: 1px #DBDBDB solid; height: 30px; margin-top: 10px; cursor: pointer;" />
                                   </td>
                                </tr>
                            </tbody>
                        </table>
                    <% } %>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</asp:Content>
